local FightBuff = require("gameLogic.fight.fightBuff.FightBuff")
local BuffProcessHurt = class("BuffProcessHurt", FightBuff)

function BuffProcessHurt:ctor(config, entity, whoEntity)
    BuffProcessHurt.super.ctor(config, entity, whoEntity)
end

function BuffProcessHurt:_excute(battleReport, hurt)
    local dxValue = math.floor(hurt.value * (self._config.attack_value / 1000))
    if self._config.toneup == 1 then
        hurt.value = hurt.value + dxValue
    else
        hurt.value = hurt.value - dxValue
    end
    self._manager:afectBuffReport(self, dxValue, battleReport)
end

return BuffProcessHurt
